package org.james.deleter.components;

import javafx.application.Platform;
import javafx.geometry.Pos;
import javafx.scene.control.ListView;
import javafx.scene.layout.HBox;

public class InfoListBox extends HBox {
	
	private static ListView<String> messageList = new ListView<>();
	

	public InfoListBox(){
		super();
		this.initialize();
	}
	
	private void initialize(){
		messageList.getStyleClass().add("messageList");
		this.getChildren().addAll(messageList);
		this.setAlignment(Pos.BASELINE_CENTER);;
	}
	
	public static void addMessageInfo(String message){
		Platform.runLater(()-> {
			messageList.getItems().add(message);
		});
	}
	
	public static ListView<String> getMessageList(){
		return messageList;
	}
	
	
}
